package com.paper.tiger.easy.rpc.center;

import com.paper.tiger.easy.rpc.center.common.RegisterObject;
import com.paper.tiger.easy.rpc.center.config.NettyConfig;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/6/15 20:00
 * @since JDK 1.8
 */
public class MainClass
{


    public static void main(String[] args)
    {
        String bossThreadNum = System.getProperty("bossThreadNum","1");
        String workerThreadNum = System.getProperty("workerThreadNum","5");
        String registyPort = System.getProperty("registyPort","10082");
        String ideReadTimeOut = System.getProperty("ideReadTimeOut", "10");

        NettyConfig nettyConfig = new NettyConfig();

        nettyConfig.setBossThreadNum(Integer.valueOf(bossThreadNum));
        nettyConfig.setWorkerThreadNum(Integer.valueOf(workerThreadNum));
        nettyConfig.setRegistyPort(Integer.valueOf(registyPort));
        nettyConfig.setIdeReadTimeOut(Integer.valueOf(ideReadTimeOut));

        RegisterObject registerObject = new RegisterObject();
        registerObject.registerService();
        new NettyServer().start(nettyConfig);

    }


}
